package com.lt.flashcard.model.entity;

import org.bson.types.ObjectId;

import com.google.code.morphia.annotations.Entity;
import com.google.code.morphia.annotations.Id;
import com.google.code.morphia.annotations.Indexed;
import com.google.code.morphia.utils.IndexDirection;

@Entity("vote")
public class Vote {
//khoi dung reference cho tiet kiem bo nho
	@Id
	private ObjectId id;
	
	@Indexed(value = IndexDirection.ASC, name = "userId")
	private Long uid;
	
	@Indexed(value = IndexDirection.ASC, name = "flashcardsetId")
	private Long fsid;
	
	@Indexed(value = IndexDirection.ASC, name = "rating")
	private int rating;
	
	public ObjectId getId() {
		return id;
	}
	public void setId(ObjectId id) {
		this.id = id;
	}
	public Long getUid() {
		return uid;
	}
	public void setUid(Long uid) {
		this.uid = uid;
	}
	public Long getFsid() {
		return fsid;
	}
	public void setFsid(Long fsid) {
		this.fsid = fsid;
	}
	public int getRating() {
		return rating;
	}
	public void setRating(int rating) {
		this.rating = rating;
	}
	
}
